﻿<UserControl x:Class="Caliburn.Micro.HelloScreens.Shell.ShellView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:ct="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
             xmlns:cal="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro"
             xmlns:Controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Layout.Toolkit"
             xmlns:local="clr-namespace:Caliburn.Micro.HelloScreens.Framework.Controls">
	<Grid>
        <!--Resources and TiledBackground control borrowed from the SL4 JetPack theme.-->
		<local:TiledBackground SourceUri="/Resources/Images/backgroundtexture.png" />
		<Image Source="/Resources/Images/backgroundshadow.png"
		       Stretch="Fill" />

		<ct:DockPanel>
			<TextBlock ct:DockPanel.Dock="Top"
			           Foreground="White"
			           Text="Hello Screens"
			           Margin="4 4 0 12"
			           FontSize="28"
			           FontWeight="Bold" />

			<ItemsControl x:Name="Items"
			              ct:DockPanel.Dock="Bottom"
			              HorizontalAlignment="Center">
				<ItemsControl.ItemsPanel>
					<ItemsPanelTemplate>
						<StackPanel Orientation="Horizontal" />
					</ItemsPanelTemplate>
				</ItemsControl.ItemsPanel>
				<ItemsControl.ItemTemplate>
					<DataTemplate>
						<Button cal:Message.Attach="Show"
						        Margin="8">
							<Grid Width="100">
								<StackPanel>
									<Image Source="{Binding Icon}"
									       Width="48"
									       Height="48" />
									<TextBlock Text="{Binding IconName, Mode=TwoWay}"
									           HorizontalAlignment="Center" />
								</StackPanel>
								<TextBlock VerticalAlignment="Top"
								           HorizontalAlignment="Right"
								           Margin="2"
								           Text="{Binding Status, Mode=TwoWay}" />
							</Grid>
						</Button>
					</DataTemplate>
				</ItemsControl.ItemTemplate>
			</ItemsControl>

			<Controls:TransitioningContentControl x:Name="ActiveItem"
			                                      Style="{StaticResource specialTransition}"
			                                      Margin="20" />
		</ct:DockPanel>

        <ContentControl x:Name="Dialogs" 
                        VerticalContentAlignment="Stretch"
                        HorizontalContentAlignment="Stretch"/>
    </Grid>

</UserControl>